package com.wn.ziroom.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author wangzhijia
 * @since 2023-02-23 02:27:54
 */
@Getter
@Setter
@TableName("t_room")
public class Room {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;



    /**
     * 租金
     */
    @TableField("rent")
    private Double rent;


    @TableField("number")
    private String number;


    /**
     * 业主ID
     */
    @TableField("owner_id")
    private Integer ownerId;

    /**
     * 租客ID
     */
    @TableField("user_id")
    private Integer userId;


    @TableField("introduction")
    private String introduction;

    @TableField("position")
    private String position;

    @TableField("direction")
    private String direction;

    /**
     * 房子图片
     */
    @TableField("img")
    private String img;

    /**
     * 类型
     */
    @TableField("type")
    private String type;



    /**
     * 签约开始时间
     */
    @TableField("start_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format="yyyy-MM-dd")
    private Date startTime;

    /**
     * 签约结束时间
     */
    @TableField("end_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format="yyyy-MM-dd")
    private Date endTime;

    @TableField("build")
    private int build;



    @TableField("roomtype")
    private String roomtype;



    @TableField("quarters_id")
    private int quartersId;

    @TableField("area")
    private Double area;

}
